<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title> Terrarien Steuerung </title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <link rel="stylesheet" href="style.css" type="text/css">
</head>

<body>

  <h2>H2 - Hier k&ouml;nnen Zeiteinstellungen vorgenommen werden</h2>


<?php 

  $timesyncModus = $_GET["timesyncModus"];


if($timesyncModus == "")
{
echo "<form action=\"time_set.php\">\n";
echo "  <p>Zeitmodus ausw&aumlhlen:</p>\n";
echo "  <p>\n";
echo "    <input type=\"radio\" name=\"timesyncModus\" value=\"ZeitraumModus\"> Zeitraum Modus<br>\n";
echo "    <input type=\"radio\" name=\"timesyncModus\" value=\"TimeTableModus\"> Time Table Modus<br>\n";
echo "    <input type=\"radio\" name=\"timesyncModus\" value=\"PeriodModus\"> Periodischer Modus<br>\n";
echo "    <input type=\"radio\" name=\"timesyncModus\" value=\"SyncModus\"> Sync Modus<br>\n";
echo "  </p>\n";
echo "  <input type=\"submit\" name=\"Text1\" value=\"Auswahl anzeigen\">\n";
echo "</form>\n";
}



else if ($timesyncModus == "ZeitraumModus")
{

$file=fopen(".save_cron_var","r");

$ON_timexx1=fgets($file,30);
$ON_timex1= explode("=",$ON_timexx1);
$ON_timexx2=fgets($file,30);
$ON_timex2= explode("=",$ON_timexx2);
$ON_timexx3=fgets($file,30);
$ON_timex3= explode("=",$ON_timexx3);
$ON_timexx4=fgets($file,30);
$ON_timex4= explode("=",$ON_timexx4);

$OFF_timexx1=fgets($file,30);
$OFF_timex1= explode("=",$OFF_timexx1);
$OFF_timexx2=fgets($file,30);
$OFF_timex2= explode("=",$OFF_timexx2);
$OFF_timexx3=fgets($file,30);
$OFF_timex3= explode("=",$OFF_timexx3);
$OFF_timexx4=fgets($file,30);
$OFF_timex4= explode("=",$OFF_timexx4);
fclose($file);


echo "<h3>Zeitraum Modus:</h3>\n";
echo "<br>\n";

echo "<form action=\"save_cron.php\" method=\"post\">\n";
echo "  <table border=\"3\" cellpadding=\"0\" cellspacing=\"4\">\n";
echo "    <tr>\n";
echo "     <th> <p>Schaltzeit 1</p> </th>\n";
echo "    </tr>\n";
echo "    <tr>\n";
echo "      <td align=\"right\">ON:</td>\n";
echo "      <td><input name=\"ON_time1\" value=\"$ON_timex1[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    <!--/tr-->\n";
echo "    <!--tr-->\n";
echo "      <td align=\"right\">OFF:</td>\n";
echo "      <td><input name=\"OFF_time1\" value=\"$OFF_timex1[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    </tr>\n";
echo "    \n";
echo "    <tr>\n";
echo "     <th> <p>Schaltzeit 2</p> </th>\n";
echo "    </tr>\n";
echo "    <tr>\n";
echo "      <td align=\"right\">ON:</td>\n";
echo "      <td><input name=\"ON_time2\" value=\"$ON_timex2[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    <!--/tr-->\n";
echo "    <!--tr-->\n";
echo "      <td align=\"right\">OFF:</td>\n";
echo "      <td><input name=\"OFF_time2\" value=\"$OFF_timex2[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    </tr>\n";
echo "    <tr>\n";
echo "     <th> <p>Schaltzeit 3</p> </th>\n";
echo "    </tr>\n";
echo "    <tr>\n";
echo "      <td align=\"right\">ON:</td>\n";
echo "      <td><input name=\"ON_time3\" value=\"$ON_timex3[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    <!--/tr-->\n";
echo "    <!--tr-->\n";
echo "      <td align=\"right\">OFF:</td>\n";
echo "      <td><input name=\"OFF_time3\" value=\"$OFF_timex3[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    </tr>\n";
echo " \n";
echo "    <tr>\n";
echo "     <th> <p>Schaltzeit 4</p> </th>\n";
echo "    </tr>\n";
echo "    <tr>\n";
echo "      <td align=\"right\">ON:</td>\n";
echo "      <td><input name=\"ON_time4\" value=\"$ON_timex4[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    <!--/tr-->\n";
echo "    <!--tr-->\n";
echo "      <td align=\"right\">OFF:</td>\n";
echo "      <td><input name=\"OFF_time4\" value=\"$OFF_timex4[1]\" type=\"text\" size=\"6\" maxlength=\"5\"></td>\n";
echo "    </tr> \n";
echo "  </table>\n";

//Save Button
echo "  <input type=\"submit\" name=\"cronsave\" value=\"speichern\">\n";
echo "</form>\n";



//echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"15\">\n";

//Back Button
echo "<br>";
echo "<form action=\"index.html\">\n";
echo "  <input type=\"submit\" name=\"Text1\" value=\"zur&uuml;ck\">\n";
echo "</form>\n";
}

else if ($timesyncModus == "TimeTableModus")
{
	echo "<h3>Time Table Modus:</h3>\n";
	echo "<br>\n";


//Back Button
echo "<br>";
echo "<form action=\"index.html\">\n";
echo "  <input type=\"submit\" name=\"Text1\" value=\"zur&uuml;ck\">\n";
echo "</form>\n";	
}




else if ($timesyncModus == "PeriodModus")
{
	echo "<h3>Periodischer Modus:</h3>\n";
	echo "<br>\n";


	
//Back Button
echo "<br>";
echo "<form action=\"index.html\">\n";
echo "  <input type=\"submit\" name=\"Text1\" value=\"zur&uuml;ck\">\n";
echo "</form>\n";
}





else if ($timesyncModus == "SyncModus")
{
	
	echo "<h1>Sync Modus:</h1>\n";
	echo "<br>\n";

//Back Button
echo "<br>";
echo "<form action=\"index.html\">\n";
echo "  <input type=\"submit\" name=\"Text1\" value=\"zur&uuml;ck\">\n";
echo "</form>\n";
}


echo "\n";
?>

<!--div class="frame"><a style="font-weight:normal" href="index.html" target="_top">Frame fehlt? Bitte nachladen.</a></div!-->
</body>
</html>
